package GUI;

import javax.swing.*;
import java.awt.*;

/**
 * This class creates instance of AddRequestPanel	
 * to display when needed	
 * @author Natali
 *  
 */
public class AddRequestGui extends JPanel {
	
	private static final long serialVersionUID = 1L;
	
	private JButton canButton;
	private JButton subButton;
	private JTextField infoSystem;
	private JTextArea currStat;
	private JTextArea changeDesc;
	private JTextArea argu;
	private JTextArea comm;
	
	/**
	 * The constructor 
	 */
	public AddRequestGui() {
		super();
		infoSystem = new JTextField();
		currStat = new JTextArea();
		changeDesc = new JTextArea();
		argu = new JTextArea();
		comm = new JTextArea();	
		subButton = new JButton("submit");
		canButton = new JButton("cancel");		
		initialize();
	}
	
	/**
	 * This method initializes AddRequestPanel	
	 */
	public void initialize(){
		
		JLabel lblAddReq = new JLabel("Add request window");
		lblAddReq.setForeground(Color.BLUE);
		lblAddReq.setFont(new Font("Arial Black", Font.BOLD, 17));
		lblAddReq.setBounds(174, 30, 241, 47);
		add(lblAddReq);
		
		JLabel lblNewLabel = new JLabel("Related information system:");
		lblNewLabel.setFont(new Font("Arial", Font.BOLD, 12));
		lblNewLabel.setBounds(10, 102, 175, 26);
		add(lblNewLabel);
		
		infoSystem.setBounds(184, 99, 362, 35);
		add(infoSystem);
		infoSystem.setColumns(10);
		
		JLabel curStatus = new JLabel("Current status description:");
		curStatus.setFont(new Font("Arial", Font.BOLD, 12));
		curStatus.setBounds(10, 164, 175, 26);
		add(curStatus);
		
		currStat.setBounds(184, 154, 362, 57);
		add(currStat);
		
		JLabel changeDes = new JLabel("Change description:");
		changeDes.setFont(new Font("Arial", Font.BOLD, 12));
		changeDes.setBounds(10, 262, 175, 20);
		add(changeDes);
			
		changeDesc.setBounds(182, 334, 364, 70);
		add(changeDesc);
		
		JLabel argument = new JLabel("Argument:");
		argument.setFont(new Font("Arial", Font.BOLD, 12));
		argument.setBounds(10, 346, 175, 35);
		add(argument);
		
		argu.setBounds(174, 437, 364, 70);
		add(argu);
		
		JLabel comments = new JLabel("Comments:");
		comments.setFont(new Font("Arial", Font.BOLD, 12));
		comments.setBounds(10, 453, 175, 55);
		add(comments);

		comm.setBounds(182, 236, 364,60);
		add(comm);

		
		subButton.setFont(new Font("Arial", Font.PLAIN, 12));
		subButton.setBounds(401, 616, 122, 40);
		add(subButton);
		
		canButton.setFont(new Font("Arial", Font.PLAIN, 12));
		canButton.setBounds(63, 616, 122, 40);
		add(canButton);
		
		setLayout(null);
		setSize(new Dimension(600, 800));
		}
	
	/**
	 * 
	 * @return JTextField with the information system
	 */
	public JTextField getTextField_infoSystem(){
		return infoSystem;
	}
	/**
	 * 
	 * @return JtextField with the current status
	 */
	public JTextArea getTextField_currStat(){
		return currStat;
	}
	/**
	 * 
	 * @return JtextField with the change description 
	 */
	public JTextArea getTextField_changeDesc(){
		return changeDesc;
	}
	/**
	 * 
	 * @return JtextField with arguments
	 */
	public JTextArea getTextField_argu(){
		return argu;
	}
	/**
	 * 
	 * @return JtextField with comments
	 */
	public JTextArea getTextField_comm(){
		return comm;
	}
	/**
	 * 
	 * @return  JButton the submit button
	 */
	public JButton getSubButt(){
		return subButton;
	}
	
	/**
	 * 
	 * @return JButton the cancel button
	 */
	public JButton getCanButt(){
		return canButton;
	}

	/**
	 * 
	 * @param canButton to set the cancel button
	 */
	public void setCanButton(JButton canButton) {
		this.canButton = canButton;
	}
}